using UnityEngine;

public abstract class ItemUIBase<T> : MonoBehaviour where T : ItemUIBase<T>
{
	protected CanvasGroup _CG;

	protected bool _m可见性;

	protected Camera _MainCamera;

	private RectTransform _RTsf;

	public bool _可见性
	{
		get
		{
			return _m可见性;
		}
		set
		{
			if (value != _m可见性)
			{
				if (value)
				{
					_CG.alpha = 1f;
				}
				else
				{
					_CG.alpha = 0f;
				}
				_m可见性 = value;
			}
		}
	}

	public T F_Init()
	{
		_CG = GetComponent<CanvasGroup>();
		_RTsf = GetComponent<RectTransform>();
		_m可见性 = true;
		_MainCamera = Camera.main;
		return this as T;
	}

	public void F_SetPos(Vector2 Pos)
	{
		_RTsf.position = _MainCamera.WorldToScreenPoint(Pos);
	}
}
